// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.CostSupplementFormSubtable;
import com.fowo.api.model.cost.supplement.form.subtable.CostSupplementFormSubtableItemVo;
import com.fowo.api.model.cost.supplement.form.subtable.CostSupplementFormSubtableItemVoPages;
import com.fowo.api.model.cost.supplement.form.subtable.CostSupplementFormSubtableSearchParamPo;
import com.fowo.api.model.cost.supplement.form.subtable.CostSupplementFormSubtableVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CostSupplementFormSubtableMapper
  extends BaseMapper<CostSupplementFormSubtable> {
  Page<CostSupplementFormSubtableItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
  List<OptionItem<CostSupplementFormSubtableItemVo>> searchOptions(
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
  List<CostSupplementFormSubtableItemVo> search(
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
  Long getIdByFnsku(@Param("fnsku") String fnsku);

  List<Long> getIdsByFnsku(@Param("list") List<String> list);

  String getFnskuById(@Param("id") Long id);

  List<Map<String, Object>> getFnskuByIds(@Param("ids") List<Long> ids);
  CostSupplementFormSubtableVo selectVoById(@Param("id") Long id);
  /**
   * 查询 所属成本补录单 分页下属列表
   */
  List<CostSupplementFormSubtableItemVoPages> selectPagesByParentCostSupplementForm(
    @Param("search") CostSupplementFormSubtableSearchParamPo search
  );
}
